﻿{{include 'admin/public/header.html'}}


<div class="main-container" id="main-container">
	<div class="main-container-inner">

		{{include 'admin/public/nav.html'}}


		<div class="main-content">


			<div class="page-content">

				<div class="page-header">
					<h1>
						用户列表
					</h1>
				</div>

				<!--表格-->

				<div class="table-responsive">

					<table id="sample-table-1" class="table table-striped table-bordered table-hover center">
						<thead>
							<tr>

								<th class="center">用户名</th>
								<th class="center">姓名</th>
								<th class="center">地址</th>
								<th class="center">手机号</th>
								<th class="center">年费</th>
								<th class="center">设备数量</th>



								<th class="center">
									<i class="icon-time bigger-110 hidden-480"></i>
									最后登录
								</th>
							
								<th width="100px;" class="center">操作</th>
							</tr>
						</thead>

						<tbody>

							{{each list}}
							<tr class="">


								<td>
									{{$value.username}}
								</td>

								<td>
									{{$value.name}}
								</td>

								<td>
									{{$value.address}}
								</td>

								<td>
									{{$value.phone}}
								</td>


								<td>
									{{$value.year_fee}}
								</td>

								<td>
									{{$value.device_num}}
								</td>

								<td>
									{{$value.last_time | dateFormat}}
								</td>								
								<td width="120px">
									<div class="visible-md visible-lg hidden-sm hidden-xs btn-group center">

										<a class="btn btn-primary btn-xs" style="margin-left:5px;"
										href="/admin/manage/edit?id={{@$value._id}}">编辑</a>
										<a class="btn btn-danger btn-xs" style="margin-left:5px;"
										onclick="return confirm('确定要禁用此管理员吗？');"
										href="/admin/manage/disable?id={{@$value._id}}">禁用</a>

									</div>

								</td>
							</tr>

							{{/each}}

						</tbody>
					</table>

					<div id="page" class="pagination"></div>
				</div>

			</div>
		</div><!-- /.main-content -->

	</div><!-- /.main-container-inner -->

</div><!-- /.main-container -->

<script src="{{__ROOT__}}/admin/js/jquery-2.0.3.min.js"></script>
<script src="{{__ROOT__}}/admin/js/jqPaginator.js"></script>

<script>

	$(function(){

		$('#page').jqPaginator({
			totalPages: {{totalPages}},
			visiblePages: 8,
			currentPage: {{page}},
			onPageChange: function (num, type) {
				if(type=='change'){
					location.href="/admin/manage?page="+num;
				}
			}
		})
	})

</script>


</body>

</html>